Skip to content

Use cohttp and eio instead of curly#44

Closed
gpetiot wants to merge 8 commits intotarides:mainfrom
gpetiot:eio
Closed

Use cohttp and eio instead of curly#44
gpetiot wants to merge 8 commits intotarides:mainfrom
gpetiot:eio

Conversation

@gpetiot
Copy link

@gpetiot gpetiot commented Sep 26, 2024

Undoing #12 and using eio instead of lwt

gpetiot and others added 6 commits September 26, 2024 18:37
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@gpetiot
Copy link
Author

gpetiot commented Sep 26, 2024

Would love to get a sanity check about my use of cohttp-eio @samoht @talex5
I feel like I should functorize the IO to be able to have different types of Body and Client instead of just eio, but not sure it's worth the extra complexity, only okra is supposed to use this lib.

let info = Cmd.info "get-activity" ~version

module Client = struct
let null_auth ?ip:_ ~host:_ _ = Ok None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should make a cohttp-eio-tls package with a proper authenticator.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look at doing it this week.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I'm only going to work on this PR during Hacking Days, so no pressure!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the example to use a proper authenticator now: mirage/ocaml-cohttp#1091

It's just:

let authenticator =
  match Ca_certs.authenticator () with
  | Ok x -> x
  | Error (`Msg m) -> Fmt.failwith "Failed to create system store X509 authenticator: %s" m

@gpetiot gpetiot closed this Jan 29, 2025
@gpetiot gpetiot deleted the eio branch January 29, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments